#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSplitter>
#include <QTableView>
#include <QTextBrowser>
#include <QPushButton>
#include <QComboBox>
#include <QGroupBox>
#include <QToolBar>
#include <QTextBrowser>
#include <QLabel>
#include "mytreeview.h"
#include "TreeModel.h"
#include "custommodel.h"
#include "customtabview.h"
#include <QFile>
#include <QFileInfo>
#include <QDir>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    //表格视图部分初始化
    void fun_ViewInit();
    //节点初始化
    void fun_DataInit();

    void fun_getRootFileList(TreeItem *ParentItem);
    void fun_getChildFileList(TreeItem *ParentItem,QString Path);
    void fun_Creator_ChildNode(TreeItem *parent,const _DATA_STRUCT &data);
    QIcon getFileIcon(QFileInfo &fileInfor);
signals:

public slots:
    //树形列表双击
    void slots_TreeviewDoubleClicked();
    //点击张开时执行改槽函数
    void slots_expanded(const QModelIndex &index);
    //表格点击按钮
    void slots_btnClicked(const QModelIndex index);
public:
    QSplitter *m_spl_Horizontal;
    QSplitter *m_spl_Vertical;

    CustomTabView *m_tabView;
    MyTreeView *m_treeView;

    TreeModel *m_treeModel;
    CustomModel *m_tabModel;

protected:
    void changeEvent(QEvent *event);

public:

private:
    Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
